<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>左定右变-position</title>
    <style>
        body, html {
            margin: 0;
            width: 100%;
            height: 100%;
        }
        /* 不能用双position */
        .left {
            position: absolute;
            width: 500px;
            height: 100%;
            background: #448EF6;
        }
        .right {
            margin-left: 500px;
            height: 100%;
            background: #FFE981;
        }
    </style>
</head>
<body>
    <div class="left"></div>
    <div class="right">1</div>
</body>
</html>